Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DSDHacked [SOUNDS] support #1

Merged

Conversation

electricbrass
Copy link

@electricbrass electricbrass commented Dec 8, 2024

Implement PatchSounds for DSDHacked.

@cmbernard333 cmbernard333 force-pushed the feature/dsdhacked-2021 branch from 0ba5c12 to ed0fec4 Compare December 8, 2024 17:00
@electricbrass electricbrass marked this pull request as ready for review December 8, 2024 23:51
common/d_dehacked.cpp Show resolved Hide resolved
{
for (int i = 0; i < count; i++)
{
SoundMap.insert(source[i] ? strdup(source[i]) : NULL, i);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

According to the id24spec, sfx has a soundnum that is int32_t. We should add those for all sounds if possible so we can reference them directly by index. This is similar to how mobjinfo and state_t have their own indices.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though looking at PatchSounds DoomObjectContainer does have the ability to store and find the given index that a sound is stored with. Does this map resolve to an sfx struct somewhere?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, the sound structs are stored in S_sfx, a vector that is mostly only modified and accessed by functions from s_sound.cpp

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Making a note here (not necessary to implement right now): the struct channel_t in s_sound.cpp is similar to the id24spec struct sfxinfo_s. That's where we can do id24 work later on.

common/d_dehacked.cpp Outdated Show resolved Hide resolved
common/d_dehacked.h Show resolved Hide resolved
@electricbrass
Copy link
Author

Don't want to merge this yet, it's causing some issues with multiplayer in eviternity 2.

@electricbrass
Copy link
Author

Don't want to merge this yet, it's causing some issues with multiplayer in eviternity 2.

Fixed, soundmap wasn't being initialized on the server.

@cmbernard333 cmbernard333 merged commit f34a445 into cmbernard333:feature/dsdhacked-2021 Dec 12, 2024
11 checks passed
@electricbrass electricbrass deleted the dsdhacked-sound branch December 12, 2024 22:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants